package com.tianhui.consignortwofei.mvp.ui.fragment.display;

import com.fgs.common.CommonPresenter;
import com.fgs.common.CommonView;
import com.tianhui.consignortwofei.R;
import com.tianhui.consignortwofei.base.BaseFragment;
import com.tianhui.consignortwofei.interf.IChartViewInfo;
import com.tianhui.consignortwofei.interf.OnDisplayDataShowListener;
import com.tianhui.consignortwofei.widget.LineChartView;

import java.util.List;

import butterknife.BindView;

/**
 * @author fgs
 * @date 2021/6/16
 * @description
 **/
public class LineDisplayDataFragment extends BaseFragment implements OnDisplayDataShowListener {

    @BindView(R.id.fragment_display_data_line_driverLineCharView)
    LineChartView driverLineChartView;

    @BindView(R.id.fragment_display_data_line_carLineCharView)
    LineChartView carLineChartView;
    @BindView(R.id.fragment_display_data_line_orderLineCharView)
    LineChartView orderLineChartView;
    @BindView(R.id.fragment_display_data_line_freightLineCharView)
    LineChartView freightLineChartView;


    @Override
    protected int getLayoutId() {
        return R.layout.fragment_display_data_line;
    }

    @Override
    protected CommonView createView() {
        return null;
    }

    @Override
    protected CommonPresenter createPresenter() {
        return null;
    }

    @Override
    protected void init() {

    }

    @Override
    public void showNewDriverDisplayData(List<IChartViewInfo> list) {
        driverLineChartView.setLineChartData(list);
    }

    @Override
    public void showNewCarDisplayData(List<IChartViewInfo> list) {
        carLineChartView.setLineChartData(list);
    }

    @Override
    public void showNewOrderDisplayData(List<IChartViewInfo> list) {
        orderLineChartView.setLineChartData(list);
    }

    @Override
    public void showNewFreightDisplayData(List<IChartViewInfo> list) {
        freightLineChartView.setLineChartData(list);
    }
}
